package com.time.sky.controller;



import com.time.sky.entity.Cost;
import com.time.sky.mapper.CostMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class CostController {
    @Autowired
    private CostMapper costMapper;


    @RequestMapping("/cost/selectCostList")
    public List<Cost> selectCostList(@RequestBody Cost cost){
        return costMapper.selectCostList(cost);
    }

    @RequestMapping("/cost/findAll")
    public List<Cost> findAll(){
        return costMapper.findAll();
    }

}
